<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>VisioLogin Example</title>
    <!-- 引入打包后的 JavaScript 文件 -->
    <script src="effet/effet.js"></script>
    <script>
        // 人脸登录，人脸打卡，睡眠检测
        document.addEventListener("DOMContentLoaded", function() {
            effet.init({
                el: 'myface',
                punchDistance:25,
                punchSuccessColor:'#13ce66',
                type:'clockIn',
                callBack: (data) => {
                    console.log(data);
                }
            });
        });
    </script>
    <style>
        #myface{
            width: 100%;
            height: 600px;
            position: absolute;
            transform: translate(-50%,-50%);
            left: 50%;
            top: 50%;
            overflow: hidden;
            border: 1px red solid;
        }
    </style>
</head>
<body>
<!-- 用于渲染人脸识别的容器 -->
<div id="myface"></div>

<button onclick="restartFace()">重新检测</button>

<script>

    function restartFace(){
        effet.restart();
    }

</script>
</body>
</html>
